package com.joinlabs.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.servlet.ModelAndView;

import com.joinlabs.entity.Log;
import com.joinlabs.entity.Weibo;
import com.joinlabs.service.ILogService;

@Controller
@RequestMapping("/homepage")
@SessionAttributes(names= {"logdb"})
public class HeadLine {
	//访问头条界面
	
	@Resource
	private ILogService logService;
	
	@RequestMapping("/headline")
	public ModelAndView headline(ModelMap map){
		List<Log> lw = logService.selectLog();
		map.addAttribute("logdb",lw);
		System.out.println(lw);
		return new ModelAndView("/homepage/headline");
	}
}
